﻿namespace Models.System.Monitor
{
    public class MonitorOutput
    {
        /// <summary>
        /// 系统信息
        /// </summary>
        public SystemOutput system { get; set; }
        /// <summary>
        /// CPU信息
        /// </summary>
        public CpuOutput cpu { get; set; }
        /// <summary>
        /// 内存信息
        /// </summary>
        public MemoryOutput memory { get; set; }
        /// <summary>
        /// 硬盘信息
        /// </summary>
        public DiskOutput disk { get; set; }
        /// <summary>
        /// 服务器当时时间戳
        /// </summary>
        public double time { get; set; }
    }

    public class DiskOutput
    {
        /// <summary>
        /// 硬盘总容量
        /// </summary>
        public string total { get; set; }
        /// <summary>
        /// 空闲硬盘
        /// </summary>
        public string available { get; set; }
        /// <summary>
        /// 已使用硬盘
        /// </summary>
        public string used { get; set; }
        /// <summary>
        /// 已使用百分比
        /// </summary>
        public string usageRate { get; set; }
    }

    public class MemoryOutput
    {
        /// <summary>
        /// 总内存
        /// </summary>
        public string total { get; set; }
        /// <summary>
        /// 空闲内存
        /// </summary>
        public string available { get; set; }
        /// <summary>
        /// 已使用内存
        /// </summary>
        public string used { get; set; }
        /// <summary>
        /// 已使用百分比
        /// </summary>
        public string usageRate { get; set; }
    }

    public class CpuOutput
    {
        /// <summary>
        /// CPU名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 物理CPU个数
        /// </summary>
        public string package { get; set; }
        /// <summary>
        /// CPU内核个数
        /// </summary> 
        public string core { get; set; }
        /// <summary>
        /// 内核个数
        /// </summary>
        public double coreNumber { get; set; }
        /// <summary>
        /// 逻辑CPU个数
        /// </summary>
        public string logic { get; set; }
        /// <summary>
        /// CPU已用百分比
        /// </summary>
        public string used { get; set; }
        /// <summary>
        /// 未用百分比
        /// </summary>
        public string idle { get; set; }
    }

    public class SystemOutput
    {
        /// <summary>
        /// 系统
        /// </summary>
        public string os { get; set; }
        /// <summary>
        /// 运行时间
        /// </summary>
        public string day { get; set; }
        /// <summary>
        /// 服务器IP
        /// </summary>
        public string ip { get; set; }
    }
}
